<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <title> New Document </title>
  <meta http-equiv="Content-type" content="text/html;charset=utf-8"  >
  <meta name="Generator" content="EditPlus">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
<script type="text/javascript">
	function person(name,age){
		this.name = name;
		this.age = age;
		this.address="测试地址11";
		//如果没有用this.那么声明的变量为局部的函数变量，不是类属性
		var x=10;
		//创建方法
		this.say = function(){
			document.write("  say方法："+this.name+","+this.age+" <br />");
			document.write("<br /> 111");
		}
	}
	var person = new person("张三11",12);
	document.writeln(person.name+","+person.age+" <br />");
	person.say();
	//alert()
</script>
</head>

 <body>
  
 </body>
</html>
